import { request } from '@umijs/max';

//获取下拉字典表
export const fetchDictData = () => {
  return request('/system/dict/data/listAll', { method: 'GET' })
}

//获取用户信息
export const fetchUserData = () => {
  return request('/getInfoApi', { method: 'GET' })
}

//获取用户聊天列表
export const fetchMessageData = () => {
  return request('/UserChatApiController/selectUserChatListByUserId', { method: 'GET' })
}

//获取用户聊天列表对话
export const fetchMessageItemData = (params) => {
  return request('/UserChatApiController/selectUserChatListByReceiveUserId', { method: 'GET', params })
}

//提交用户聊天列表对话
export const submitMessageItemData = (data) => {
  return request('/UserChatApiController/insertUserChat', { method: 'POST', data })
}

